/**
 * 
 */
package clases;

import java.util.ArrayList;

import interfaces.IControlador;

/**
 * @author root
 *
 */
public class Vista implements interfaces.IVista {
	
	public IControlador elController;
	public String nombre;
	public String numero;

	
	public Boolean validateAños(String data) {
		return this.elController.validaDataInt(data);
	}
	
	public Boolean validateSave(ArrayList<String> data){
				return this.elController.validateToCreateObject(data);
	}
	
	public void savePersona(){
		ArrayList<String> data = new ArrayList<String>();
		data.add(nombre);
		data.add(numero);

		if (this.validateSave(data)) {
			this.elController.save(data);
		} 
	}
	
	public void inputData(String aName, String aNumber){
		this.nombre = aName;
		this.numero = aNumber;	
	}
	
	public void dataFromObject(){
		this.elController.getData();
	}
	
	@Override
	public void drawNombreApellido() {
		// TODO Auto-generated method stub
		System.out.println(this.nombre);
		System.out.println(this.numero);
	}
	
	public static void main(String[] args) {
		Vista a = new Vista();
		a.nombre = "daniel";a.numero = "4";
		
		
		a.drawNombreApellido();
	}

}
